package com.zxkj.controller;

import com.zxkj.entity.ProductMatrixReq;
import com.zxkj.support.Result;
import com.zxkj.utils.BeanValidationUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author: yaoxin
 * @Date: 2021/12/10 - 12 - 10 - 10:00
 * @Description: com.zxkj.controller
 * @version: 1.0
 */
@RestController
public class TestController {
    @GetMapping("test")
    public Result test(ProductMatrixReq productMatrixReq){
        //进行参数校验
        BeanValidationUtils.validate(productMatrixReq, "xaxes", "yaxes");
        return Result.success().setData("ok");
    }
}
